      REAL ARRAY(200,200),TOTAL
      INTEGER COL,ROW
      CHARACTER*32 INFILE
      CHARACTER*1 ANS
      print*'hello' 
      print*'KEY IN INPUT FILE: '
      READ (5,1010) INFILE
      
 1010 FORMAT (A)
      OPEN (UNIT=12,FILE=INFILE,STATUS='OLD')
      DO 10 I=1,31
         DO 20 J=1,157
         ARRAY(I,J)=0.0
 20      CONTINUE
 10   CONTINUE

c      PRINT*,'RUN FOR 45 COLUMNS AND 103 ROWS? (Y/N)'
c      READ(5,1010) ANS
c      IF (ANS .EQ. 'n')THEN
c      PRINT*' KEY IN NUMBER OF ROWS'
c      READ*ROW
c      PRINT*' KEY IN NUMBER OF COLUMNS'
c      READ* COL
c      ELSE
      COL=157
      ROW=31
c      END IF

      DO 30 I=1,ROW
        READ(12,2020)(ARRAY(I,J),J=1,COL)
 30   CONTINUE

      TOTAL =0.0

      DO 40 I=1,ROW
         DO 50 J=1,COL
         TOTAL =TOTAL + ARRAY(I,J)
 50   CONTINUE
 40   CONTINUE

 2020 FORMAT(10f8.3)

      CLOSE (7)
      PRINT* 'THE TOTAL FOR THE ARRAY IS ',TOTAL
      END












